const router = require('koa-router')()
const myOrder = require('../api/myOrder')
router.prefix('/myOrder')
// #region
/**
 * @swagger
 * /myOrder/getList 获取我的订单列表:
 *   get:
 *     description: 获取我的订单列表
 *     tags: [订单模块]
 *     parameters:
 *       - name: page
 *         description: 页码
 *         in: formData
 *         required: true
 *         type: number
 *       - name: size
 *         description: 页数
 *         in: formData
 *         required: true
 *         type: number
 *       - name: orderStatus
 *         description: 订单状态（DFK,DFH,DSH,DPJ,YQX,YWC）（代付款，代发货，待收货，待评价，已取消，已完成）
 *         in: formData
 *         required: true
 *         type: string
 *     responses:
 *       0:
 *         description: 成功
 */
// #endregion
router.get('/getList', myOrder.getList)
// #region
/**
 * @swagger
 * /myOrder/setDFH 改变代发货商品状态（模拟发货）:
 *   post:
 *     description: 改变代发货商品状态（模拟发货）
 *     tags: [订单模块]
 *     parameters:
 *       - name: id
 *         description: 订单id
 *         in: formData
 *         required: true
 *         type: number
 *       - name: orderStatus
 *         description: 发货状态：DSH
 *         in: formData
 *         required: true
 *         type: string
 *     responses:
 *       0:
 *         description: 成功
 */
// #endregion
router.post('/setDFH', myOrder.setDFH)
module.exports = router